import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    Navigator
} from 'react-native';
import Boy from './Boy'
export default class Girl extends Component {
    constructor(props) {
        super(props)
        this.state={
            word: ''
        }
    }
    render() {
        return (
            <View style={styles.container}>
                <Text style={styles.text}>i am a boy</Text>
                <Text style={styles.text}>女孩收到了{this.props.word}</Text>
                <Text style={styles.text}
                      onPress={()=>{
                          this.props.onCallBack('一块巧克力🍫')
                          this.props.navigator.pop()
                      }}>回赠男孩一块巧克力🍫</Text>

            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'red',
        justifyContent: 'center'
    },
    text: {
        fontSize: 20
    }
});